<?php
require_once 'data/lyrics.php';

$str = explode("\n", $lyrics);
$value = array();



for ($i = 0; $i < count ($str);  $i++ ) {
    if ( $str [$i] != "\r"){
        
        $value[] = $str[$i];
}
}

for ($i = 0; $i < count ($value); $i++ ) {
    echo $value[$i]."<br>";
}

//xuong dong 

//$str = "$lyrics";
//echo mb_substr($str, 0, 50) .
//       "<br/>" . mb_substr($str, 0, strlen($str));
// 



//  count so ky tu trong bai hat
echo "<br>\n";
echo "\n so ky tu trong  bai hat la:";
echo strlen("$lyrics");


echo "<br>";


/// tong so  tu  trong bai hat
echo "\n tong so tu trong  bai hat la:";
echo str_word_count("$lyrics" );

    

?>
